Skip to content

Conversation

@topher200
Copy link
Contributor

@topher200 topher200 commented Jul 18, 2021

This resolves #138 by...

  1. Adding instruction hints on the power of 'stg edit'.
  2. Stripping these new hint lines from the description.
  3. Aborting 'stg edit' if all description lines are cleared.

From conversation on #138 it became
clear that aborting the 'edit' on an empty editor is correct. This behavior
mirrors 'git commit' and 'stg squash'.

Previously, if a user cleared the 'stg edit' editor window, the patch
description would be cleared. This is unintuative! Users likely expect that
this would abort the edit instead.

asciicast

@topher200 topher200 force-pushed the stg-edit-aborts-on-empty-patch-description-add branch from 421d296 to 976fc10 Compare July 18, 2021 06:13
This resolves stacked-git#138 by...

1. Adding instruction hints on the *power* of 'stg edit'.
2. Stripping these new hint lines from the description.
3. Aborting 'stg edit' if all description lines are cleared.

From conversation on stacked-git#138 it became
clear that aborting the 'edit' on an empty editor is correct.  This behavior
mirrors 'git commit' and 'stg squash'.

Previously, if a user cleared the 'stg edit' editor window, the patch
description would be cleared.  This is unintuative! Users likely expect that
this would abort the edit instead.
@topher200 topher200 force-pushed the stg-edit-aborts-on-empty-patch-description-add branch from 976fc10 to ad0d8d3 Compare July 18, 2021 06:14
@topher200 topher200 marked this pull request as ready for review July 18, 2021 06:18
@jpgrayson jpgrayson merged commit 1b2058a into stacked-git:master Jul 18, 2021
@jpgrayson
Copy link
Collaborator

Thanks for this PR. Nice refinements!

@topher200 topher200 deleted the stg-edit-aborts-on-empty-patch-description-add branch July 19, 2021 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make all the great features of stg edit more discoverable

2 participants